package com.huiqiao.lesson9.aop;
import lombok.Getter;

/**
 * 定义业务处理通用异常处理
 */
public class APIException extends RuntimeException {

    @Getter
    private final int code;

    public APIException(String message) {
        super(message);
        this.code = 500;
    }

    public APIException(int code, String message) {
        super(message);
        this.code = code;
    }
}
